<template>
  <div>
<p>你要购买商品的数量:{{count}}</p>
绑定事件 
<button @click="count+=1">+1</button>
<button @click= "addFn">+1</button>
<button @click=" addCountFn(5)">+5</button>
  </div>
</template>

<script>
export default {
data(){
  return{
    count:1
  }
},
 methods: {
    addFn(){
      this.count++
    },
     addCountFn(num){
 this.count= this.count+num
  }
  },
 
}
</script>

<style>

</style>